import { createRoot } from "react-dom/client";
//导入路由 provider组件
import { RouterProvider } from "react-router-dom";

import { PersistGate } from "redux-persist/integration/react";
import store, { persistor } from "./store/index";
//导入路由模块
import route from "./router";
import { Provider as StoreProvider } from "react-redux";
import "./index.css";

//国际化语言
import dayjs from "dayjs";
import "dayjs/locale/zh-cn"; // ES 2015
dayjs.locale("zh-cn"); // 全局使用

//导入iconfont 字体图标 js
import "./assets/iconfont/iconfont.js";
import "./assets/iconfont/iconfont.css";

createRoot(document.getElementById("root")).render(
  <StoreProvider store={store}>
    <PersistGate loading={null} persistor={persistor}>
      <RouterProvider router={route} future={{ v7_startTransition: true }} />
    </PersistGate>
  </StoreProvider>
);
